package com.junit5.demo;

import com.util.Calculator;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;

public class Junit5Demo_3_1_parallel {

    @RepeatedTest(10)
    public void countTest() throws InterruptedException {
        int result= Calculator.count(1);
        long threadId=Thread.currentThread().getId();
        System.out.println("线程号"+threadId+" 当前报名人数为:"+result);
    }

    @RepeatedTest(10)
    public void synCountTest() throws InterruptedException {
        int result= Calculator.synCount(1);
        long threadId=Thread.currentThread().getId();
        System.out.println("线程号"+threadId+" 当前报名人数为:"+result);
    }
}
